<%--
    Document   : index
    Created on : 12.02.2010, 22:48:51
    Author     : Morfant
--%>



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="stud.cp.user.valueobjects.PropertyGroup"%>
<%@page import="stud.cp.user.valueobjects.WeaponType"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java"%>
<html>
    <%@include  file="/header.jsp" %>
    <body>
        <div class="page">
            <%@include file="/cap.jsp" %>
            <div id="main">
                <%-- Переход на страницу добавления автора. --%>
                <%@include file="/Designer/designer_cap.jsp" %>
                <h2>Список групп свойств</h2>
                <table id="buttontable">
                    <tr>
                        <th>
                            <div id="weaponmenucontainer">
                                <ul id="weaponmenu">
                                    <li><a href="<%= response.encodeURL("property-group-action.do")
                                                            + "?"
                                                            + PluginConst.SUBACTION
                                                            + "="
                                                            + PluginConst.GET_ADD_PAGE%>">Добавить</a></li>
                                </ul>
                            </div>
                        </th>
                    </tr>
                </table>
                <% List<PropertyGroup> list =
                                    (List<PropertyGroup>) request.getAttribute(PluginConst.PROPERTY_GROUPS_LIST);
                            if ((list != null)&&(list.size()>0)) {%>
                <table>
                    <tr>
                        <th>
                        </th>
                        <th>
                            Имя группы
                        </th>
                    </tr>
                    <%for (PropertyGroup item : list) {%>
                    <tr>
                        <td>
                            <div id="weaponmenucontainer">
                                <ul id="weaponmenu">
                                    <li><a href="<%= response.encodeURL("property-group-action.do")
                                                            + "?"
                                                            + PluginConst.SUBACTION
                                                            + "="
                                                            + PluginConst.GET_EDIT_PAGE
                                                            + "&"
                                                            + PluginConst.PROPERTY_GROUP_ID
                                                            + "="
                                                            + item.getProperty_group_id()%>">Редактировать</a></li>
                                    <br>
                                    <li><a href="<%= response.encodeURL("property-group-action.do")
                                                            + "?"
                                                            + PluginConst.SUBACTION
                                                            + "="
                                                            + PluginConst.GET_DELETE_PAGE
                                                            + "&"
                                                            + PluginConst.PROPERTY_GROUP_ID
                                                            + "="
                                                            + item.getProperty_group_id()%>">Удалить</a></li>
                                </ul>
                            </div>
                        </td>
                        <td>
                            <%= item.getName()%>
                        </td>
                    </tr>
                    <% }%>
                </table>
                <% }%>
            </div>
        </div>
    </body>
</html>
